import axios from 'axios'

//登录
export const authLogin = (data) => {
  return axios.post("login", data)
}

//获取用户列表
export const getUserList = (data) => {
  return axios.get("user/list", { params: data })
}
//添加用户 {"username":"admin123","password":"123456","realname":"小无","status":1}
export const addUser = (data) => {
  return axios.post("user/create", data)
}
//获取用户详情
export const getUserDetail = (id) => {
  return axios.get("user/" + id)
}
//修改用户 {"user_id":154,"password":"zhystc888","realname":"啊呜","status":1}
export const updateUser = (data) => {
  return axios.post("user/update", data)
}

//删除用户 {"user_id":154}
export const deleteUser = (user_id) => {
  return axios.post("user/delete", { user_id: user_id })
}